package com.gym.openapi.web.controller;

import com.gym.openapi.common.ResponseResult;
import com.gym.openapi.common.ResultTable;
import com.gym.openapi.entity.Recharge;
import com.gym.openapi.services.RechargeServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ming
 * 2021/11/26
 * description:充值管理
 */
@RestController
@RequestMapping("/recharge")
public class RechargeController {
    @Autowired
    private RechargeServices rs;

    /**
     *@author:ming
     *@Date: 2021/11/27
     *@description:页面显示
     */
    @RequestMapping("/table")
    public ResultTable reTaBle(Integer page,Integer limit) {
        return rs.reTaBle(page, limit);
    }
    /**
     *@author:ming
     *@Date: 2021/11/27
     *@description:批量删除
     */
    @RequestMapping("/del")
    public ResponseResult del(Integer[] ids) {
        return rs.del(ids);
    }

    /**
     * @author:ming
     * @Date: 2021/11/27
     * @description:编辑修改信息
     */
    @RequestMapping("/update")
    public ResponseResult update(Recharge recharge) {
        return rs.update(recharge);
    }

    /**
     * @author:ming
     * @Date: 2021/11/27
     * @description:添加数据
     */
    @RequestMapping("/add")
    public ResponseResult add(Recharge recharge) {
        return rs.add(recharge);
    }
}
